<?php


namespace support;


class Pinyin
{
    private static $instance;

    /**
     * 获得一个pinyin实例
     * @param string $loaderName
     * @return \Overtrue\Pinyin\Pinyin
     */
    public static function getInstance($loaderName = '\Overtrue\Pinyin\MemoryFileDictLoader')
    {
        if (empty(self::$instance)) {
            self::$instance = new \Overtrue\Pinyin\Pinyin($loaderName);
        }
        return self::$instance;
    }

}